package loja.view.editor.components.label;

import javax.swing.JLabel;

import loja.model.handler.PropertyView;
import loja.view.editor.components.ComponentEditor;

public class LabelIdProperty extends JLabel implements ComponentEditor,
		PropertyView {

	private static final long serialVersionUID = 1L;
	private String property;

	public LabelIdProperty(String property) {
		this.property = property;
	}

	@Override
	public void onCancel() {
		setEnabled(false);

	}

	@Override
	public void onEdit() {
		setEnabled(false);

	}

	@Override
	public void onEnd() {
		setEnabled(false);

	}

	@Override
	public void onInclude() {
		setText("0");
		setEnabled(false);

	}

	@Override
	public void onRemove() {
		setText("0");
		setEnabled(false);

	}

	@Override
	public void onSave() {
		setText("0");
		setEnabled(false);

	}

	@Override
	public void onStart() {
		setText("0");
		setEnabled(false);

	}

	@Override
	public String getProperty() {
		return property;
	}

	@Override
	public Object getPropertyValue() {
		return getText();
	}

	@Override
	public void setPropertyValue(Object value) {
		setText(String.valueOf(value));

	}

}
